package com.ruoyi.common.core.service.impl;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.mapper.BaseMapper;
import com.ruoyi.common.core.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class BaseServiceImpl<M extends BaseMapper,T extends BaseEntity> implements BaseService<T> {

    @Autowired
    private M m;

    @Override
    public void insert(T t) {
        m.insert(t);
    }

    @Override
    public void update(T t) {
        m.update(t);
    }

    @Override
    public void deleteById(String id) {
        m.deleteById(id);
    }

    @Override
    public void updateById(T t) {
        m.updateById(t);
    }

    @Override
    public void findByObj(T t) {
        m.findByObj(t);
    }

    @Override
    public List<T> findList(T t) {
       return m.findList(t);
    }

    @Override
    public void findOne(T t) {
        m.findOne(t);
    }
}
